<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    /*
        输出内容到页面上
        字符串模板
        一维数组的定义
        数组的遍历
        if选择结构
        算术运算符%
     */
    document.write(`<input type="text" placeholder="请输入数字" /></br>`);
    let arr = [1, 2, 3, "+", 4, 5, 6, "-", 7, 8, 9, "*", "c", "0", ".", "="];
    for (let i = 0; i < arr.length; i++) {
        document.write(`<button type="button">${arr[i]}</button>`);
        if ((i + 1) % 4 == 0) document.write("</br>")
    }
</script>
</body>
</html>